package org.gvp.manager.repository.impl;

import lombok.RequiredArgsConstructor;
import org.gvp.manager.mapper.GatewayRouteMapper;
import org.gvp.manager.pojo.GatewayRoute;
import org.gvp.manager.repository.GatewayRouteRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@RequiredArgsConstructor
public class GatewayRouteRepositoryImpl implements GatewayRouteRepository {
    private final GatewayRouteMapper gatewayRouteMapper;

    @Override
    public List<GatewayRoute> searchList() {
        return gatewayRouteMapper.selectList(null);
    }

    @Override
    public int append(GatewayRoute pojo) {
        return this.gatewayRouteMapper.insert(pojo);
    }

    @Override
    public int modify(GatewayRoute pojo) {
        return this.gatewayRouteMapper.updateById(pojo);
    }
}
